/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author adama
 */
@Entity
@Table(name = "artiste")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Artiste.findAll", query = "SELECT a FROM Artiste a"),
    @NamedQuery(name = "Artiste.findByIdArtiste", query = "SELECT a FROM Artiste a WHERE a.idArtiste = :idArtiste"),
    @NamedQuery(name = "Artiste.findByNom", query = "SELECT a FROM Artiste a WHERE a.nom = :nom"),
    @NamedQuery(name = "Artiste.findByPrenom", query = "SELECT a FROM Artiste a WHERE a.prenom = :prenom"),
    @NamedQuery(name = "Artiste.findByPseudo", query = "SELECT a FROM Artiste a WHERE a.pseudo = :pseudo")})
public class Artiste implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idArtiste")
    private Integer idArtiste;
    @Column(name = "Nom")
    private Character nom;
    @Column(name = "Prenom")
    private Character prenom;
    @Column(name = "Pseudo")
    private Character pseudo;
    @OneToMany(mappedBy = "idActeur")
    private Collection<Relationvideoartiste> relationvideoartisteCollection;

    public Artiste() {
    }

    public Artiste(Integer idArtiste) {
        this.idArtiste = idArtiste;
    }

    public Integer getIdArtiste() {
        return idArtiste;
    }

    public void setIdArtiste(Integer idArtiste) {
        this.idArtiste = idArtiste;
    }

    public Character getNom() {
        return nom;
    }

    public void setNom(Character nom) {
        this.nom = nom;
    }

    public Character getPrenom() {
        return prenom;
    }

    public void setPrenom(Character prenom) {
        this.prenom = prenom;
    }

    public Character getPseudo() {
        return pseudo;
    }

    public void setPseudo(Character pseudo) {
        this.pseudo = pseudo;
    }

    @XmlTransient
    public Collection<Relationvideoartiste> getRelationvideoartisteCollection() {
        return relationvideoartisteCollection;
    }

    public void setRelationvideoartisteCollection(Collection<Relationvideoartiste> relationvideoartisteCollection) {
        this.relationvideoartisteCollection = relationvideoartisteCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idArtiste != null ? idArtiste.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Artiste)) {
            return false;
        }
        Artiste other = (Artiste) object;
        if ((this.idArtiste == null && other.idArtiste != null) || (this.idArtiste != null && !this.idArtiste.equals(other.idArtiste))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.Artiste[ idArtiste=" + idArtiste + " ]";
    }
    
}
